<?php

function findUserByLogin($login){
	transactionOpen();
	$dbLink = $GLOBALS["dbLink"];
	if ($dbLink){
		$login = mysql_real_escape_string($login);
		$result_query = mysql_query("select * from user where login like '$login'");
		transactionClose();
		if (mysql_num_rows($result_query) == 1) {
			$user = mysql_fetch_assoc($result_query);
			return $user;
		}
		else {
			redirectError("problems to get user information");
		}
	}
	else {
		transactionClose();
		redirectError("problems with data base connection");
	}

}// end findUserByLogin



?>